package com.itheima.mapper;

import com.itheima.domain.Alcount;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {


    @Update("update alcount set balance=balance-#{balance} where name=#{outMan}")
    public void outMoney(@Param("outMan") String outMan, @Param("balance") double balance);

    @Update("update alcount set balance=balance+#{balance} where name=#{inMan}")
    public void inMoney(@Param("inMan")String inMan,@Param("balance") double balance);








    @Select("select * from alcount")
    public List<Alcount> findAll();
}
